<template>
    <div class="demo1">
      <div>学校名字:{{ name }}</div>
      <div>学校地址:{{ adress }}</div>
      <button @click="sendStudentName">点我向Student组件传递名字</button>
    </div>
  </template>
  
  <script>
  export default {
      name:'School',
      data () {
          return {
              name:'常州信息',
              adress:'常州'
          } 
      },
      methods:{
        sendStudentName(){
            this.$bus.$emit('sendname',this.name)
        }
      }
  }
  </script>
  
  <style>
      .demo1{
          background-color: aqua;
      }
  </style>